import type { Meta, StoryObj } from '@storybook/react-webpack5';
import Icon from './icon';
import Button from '../Button';

const meta: Meta<typeof Icon> = {
  title: '第七章：Icon 组件',
  id: 'Icon',
  component: Icon,
};
export default meta;

type Story = StoryObj<typeof Icon>;

export const ADefaultIcons: Story = {
  render: () => (
    <>
      <Icon icon="check" size="3x"/>
      <Icon icon="times" size="3x"/>
      <Icon icon="anchor" size="3x"/>
      <Icon icon="trash" size="3x"/>
      <Button size="lg" btnType="primary"><Icon icon="check"/> check </Button>
    </>
  ),
  name: "默认图标",
};

export const BThemeIcons: Story = {
  render: () => (
    <>
      <Icon icon="check" size="3x" theme="success"/>
      <Icon icon="times" size="3x" theme="danger"/>
      <Icon icon="anchor" size="3x" theme="primary"/>
      <Icon icon="exclamation-circle" size="3x" theme="warning" />
    </>
  ),
  name: "不同主题的 Icon",
};

export const CCustomIcons: Story = {
  render: () => (
    <>
      <Icon icon="spinner" size="3x" theme="primary" spin/>
      <Icon icon="spinner" size="3x" theme="success" pulse/>
    </>
  ),
  name: "更多行为的 Icon",
}; 